//
//  Muse_ex_font.swift
//  Muse
//
//  Created by mac on 2022/12/6.
//

/*
 PingFang HK
 == PingFangHK-Regular
 == PingFangHK-Ultralight
 == PingFangHK-Thin
 == PingFangHK-Light
 == PingFangHK-Medium
 == PingFangHK-Semibold
 PingFang SC
 == PingFangSC-Regular
 == PingFangSC-Ultralight
 == PingFangSC-Thin
 == PingFangSC-Light
 == PingFangSC-Medium
 == PingFangSC-Semibold
 PingFang TC
 == PingFangTC-Regular
 == PingFangTC-Ultralight
 == PingFangTC-Thin
 == PingFangTC-Light
 == PingFangTC-Medium
 == PingFangTC-Semibold
 */

import UIKit

enum MuseFontStyle {
    case bold, medium, regular, semiBold, heavy, wide
    
    var name: String {
        switch self {
        case .bold:
            return "Montserrat-Bold"
        case .medium:
            return "PingFangSC-Medium"
        case .regular:
            return "PingFangSC-Regular"
        case .semiBold:
            return "PingFangSC-Semibold"
        case .heavy:
            return "SFProRounded-Heavy"
        case .wide:
            return "HelloFont-WenYiHei"
        }
    }
}

extension CGFloat {
    
    var font_bold: UIFont? {
        UIFont(name: MuseFontStyle.bold.name, size: self)
    }
    
    var font_regular: UIFont? {
        UIFont(name: MuseFontStyle.regular.name, size: self)
    }
    
    var font_medium: UIFont? {
        UIFont(name: MuseFontStyle.medium.name, size: self)
    }
    
    var font_semiBold: UIFont? {
        UIFont(name: MuseFontStyle.semiBold.name, size: self)
    }
    
    var font_heavy: UIFont? {
        UIFont(name: MuseFontStyle.heavy.name, size: self)
    }
    
    var font_wide: UIFont? {
        UIFont(name: MuseFontStyle.wide.name, size: self)
    }

}
extension Double {
    
    var font_bold: UIFont? {
        UIFont(name: MuseFontStyle.bold.name, size: self)
    }
    
    var font_regular: UIFont? {
        UIFont(name: MuseFontStyle.regular.name, size: self)
    }
    
    var font_medium: UIFont? {
        UIFont(name: MuseFontStyle.medium.name, size: self)
    }
    
    var font_semiBold: UIFont? {
        UIFont(name: MuseFontStyle.semiBold.name, size: self)
    }
    
    var font_heavy: UIFont? {
        UIFont(name: MuseFontStyle.heavy.name, size: self)
    }
    
    var font_wide: UIFont? {
        UIFont(name: MuseFontStyle.wide.name, size: self)
    }
}
